package com.jxstyle.core.security;

import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

public class SecurityUser extends User {

	private static final long serialVersionUID = 1L;

	private com.jxstyle.modular.entity.User detail;

	public SecurityUser(com.jxstyle.modular.entity.User user, Collection<? extends GrantedAuthority> authorities) {
		super(user.getUsername(), user.getPassword(), authorities);
		user.setPassword(null);
		this.detail = user;
	}

	public com.jxstyle.modular.entity.User getDetail() {
		return detail;
	}

	public void setDetail(com.jxstyle.modular.entity.User detail) {
		this.detail = detail;
	}

}
